package jam.objects {
	import org.flixel.FlxObject;
	import jam.registry.Resource;
	import org.flixel.FlxSprite;
	/**
	 * @author oati
	 */
	public class Spring extends FlxSprite{
		public function Spring(x:Number = 0, y:Number = 0) {
			super(x*Game.TILE_SIZE, y*Game.TILE_SIZE + 3);
			this.allowCollisions = FlxObject.UP;
			this.immovable = true;
			loadGraphic(Resource.SPRING, true, false, 10, 14);
    		addAnimation("spring", [0, 3, 1, 3, 2, 1, 0, 3, 0, 0, 0, 0, 0, 0], 15, false);
			width = 10;
			height = 4;
			centerOffsets();
			offset.y = 9;
		}
	}
}
